﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FubiManger.Pad
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱，true添加，false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class Pordercontrol : Smobiler.Core.Controls.MobileUserControl
    {
        public Pordercontrol() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        /// <summary>
        /// 昵称
        /// </summary>
        public string nickname { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string ordsn { get; set; }
        /// <summary>
        /// 订单时间
        /// </summary>
        public string ordtime { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string uheard { get; set; }
        /// <summary>
        /// 餐桌号
        /// </summary>
        public string disksn { get; set; }
        public string ordid { get; set; }
        /// <summary>
        /// 订单状态
        /// </summary>
        public string codestatus { get; set; }  
        /// <summary>
        /// 到店或物流
        /// </summary>
        public string u_sage { get; set; }
        /// <summary>
        /// 1线上2线下
        /// </summary>
        public string is_online { get; set; }
        private void btninfo_Press(object sender, EventArgs e)
        {
            ((PmainForm)this.Form).Openordinfo(ordsn);
        }

        private void btncodes_Press(object sender, EventArgs e)
        {

        }

        private void Pordercontrol_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(disksn))
            {
                lbldisksn.Text = "餐桌号：" + disksn;//餐桌号                
            }
            else
            {
                if (is_online == "1")
                    lbldisksn.Text = "线上订单";
                else
                    lbldisksn.Text = "线下订单";
            }

            lblordsn.Text = "订单号：" + ordsn;//订单号
            lbltime.Text = ordtime;//订单时间
            lbltel.Text = nickname;//昵称
            if (u_sage == "1")
                lblu_sage.Text = "到店";
            else if (u_sage == "2")
                lblu_sage.Text = "物流";
        }
    }
}